Don't treat the failure of ifconfig vifX.Y down as a fatal error. This hasn't
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Wed, 23 Nov 2005 19:16:54 +0000 (19:16 +0000)
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Wed, 23 Nov 2005 19:16:54 +0000 (19:16 +0000)
emerged as a problem in the field, AFAIK, but it seems that distro scripts
could have brought the device down already by this point (Debian stable's
net.agent does ifdown vifX.Y, and it wouldn't surprise me if someone decided
to do ifconfig vifX.Y down if this failed, for example).

Logging but ignoring the failure seems sensible.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/examples/vif-bridge

index a4f6bb0e7fb83c197db22234a25dfc493921ea0c..69f1a670d7862fcb68afb0871ecaad6dea3009cc 100755 (executable)
@@ -62,7 +62,7 @@ case "$command" in
 
     offline)
         # vifs are auto-removed from bridge.
-        ifconfig "$vif" down || fatal "ifconfig $vif down failed"
+        ifconfig "$vif" down || log err "ifconfig $vif down failed"
         ;;
 esac